
#todo ------------------------ 访客主题 ------------------------
#todo ads_visit_stats
/opt/module/sqoop/bin/sqoop export \
--connect "jdbc:mysql://node101:3306/gmall_report?useUnicode=true&characterEncoding=utf-8"  \
--username root \
--password 123456 \
--table ads_visit_stats \
--num-mappers 1 \
--export-dir /warehouse/gmall/ads/ads_visit_stats \
--input-fields-terminated-by "\t" \
--update-mode allowinsert \
--update-key dt,activity_id \
--input-null-string '\\N'    \
--input-null-non-string '\\N'

#todo ads_page_path
/opt/module/sqoop/bin/sqoop export \
--connect "jdbc:mysql://node101:3306/gmall_report?useUnicode=true&characterEncoding=utf-8"  \
--username root \
--password 123456 \
--table ads_page_path \
--num-mappers 1 \
--export-dir /warehouse/gmall/ads/ads_page_path \
--input-fields-terminated-by "\t" \
--update-mode allowinsert \
--update-key dt,recent_days,source,target \
--input-null-string '\\N'    \
--input-null-non-string '\\N'




#todo ------------------------ 用户主题 ------------------------
#todo ads_user_total
/opt/module/sqoop/bin/sqoop export \
--connect "jdbc:mysql://node101:3306/gmall_report?useUnicode=true&characterEncoding=utf-8"  \
--username root \
--password 123456 \
--table ads_user_total \
--num-mappers 1 \
--export-dir /warehouse/gmall/ads/ads_user_total \
--input-fields-terminated-by "\t" \
--update-mode allowinsert \
--update-key dt,recent_days \
--input-null-string '\\N'    \
--input-null-non-string '\\N'

#todo ads_user_change
/opt/module/sqoop/bin/sqoop export \
--connect "jdbc:mysql://node101:3306/gmall_report?useUnicode=true&characterEncoding=utf-8"  \
--username root \
--password 123456 \
--table ads_user_change \
--num-mappers 1 \
--export-dir /warehouse/gmall/ads/ads_user_change \
--input-fields-terminated-by "\t" \
--update-mode allowinsert \
--update-key dt \
--input-null-string '\\N'    \
--input-null-non-string '\\N'

#todo ads_user_action
/opt/module/sqoop/bin/sqoop export \
--connect "jdbc:mysql://node101:3306/gmall_report?useUnicode=true&characterEncoding=utf-8"  \
--username root \
--password 123456 \
--table ads_user_action \
--num-mappers 1 \
--export-dir /warehouse/gmall/ads/ads_user_action \
--input-fields-terminated-by "\t" \
--update-mode allowinsert \
--update-key dt,recent_days \
--input-null-string '\\N'    \
--input-null-non-string '\\N'

#todo ads_user_retention
/opt/module/sqoop/bin/sqoop export \
--connect "jdbc:mysql://node101:3306/gmall_report?useUnicode=true&characterEncoding=utf-8"  \
--username root \
--password 123456 \
--table ads_user_retention \
--num-mappers 1 \
--export-dir /warehouse/gmall/ads/ads_user_retention \
--input-fields-terminated-by "\t" \
--update-mode allowinsert \
--update-key create_date,retention_day \
--input-null-string '\\N'    \
--input-null-non-string '\\N'




#todo ------------------------ 商品主题 ------------------------
#todo ads_order_spu_stats
/opt/module/sqoop/bin/sqoop export \
--connect "jdbc:mysql://node101:3306/gmall_report?useUnicode=true&characterEncoding=utf-8"  \
--username root \
--password 123456 \
--table ads_order_spu_stats \
--num-mappers 2 \
--export-dir /warehouse/gmall/ads/ads_order_spu_stats \
--input-fields-terminated-by "\t" \
--update-mode allowinsert \
--update-key dt,recent_days,spu_id \
--input-null-string '\\N' \
--input-null-non-string '\\N'

#todo ads_repeat_purchase
/opt/module/sqoop/bin/sqoop export \
--connect "jdbc:mysql://node101:3306/gmall_report?useUnicode=true&characterEncoding=utf-8"  \
--username root \
--password 123456 \
--table ads_repeat_purchase \
--num-mappers 1 \
--export-dir /warehouse/gmall/ads/ads_repeat_purchase \
--input-fields-terminated-by "\t" \
--update-mode allowinsert \
--update-key dt,recent_days,tm_id \
--input-null-string '\\N'    \
--input-null-non-string '\\N'



#todo ------------------------ 订单主题 ------------------------
#todo ads_order_total
/opt/module/sqoop/bin/sqoop export \
--connect "jdbc:mysql://node101:3306/gmall_report?useUnicode=true&characterEncoding=utf-8"  \
--username root \
--password 123456 \
--table ads_order_total \
--num-mappers 1 \
--export-dir /warehouse/gmall/ads/ads_order_total \
--input-fields-terminated-by "\t" \
--update-mode allowinsert \
--update-key dt,recent_days \
--input-null-string '\\N'    \
--input-null-non-string '\\N'

#todo ads_order_by_province
/opt/module/sqoop/bin/sqoop export \
--connect "jdbc:mysql://node101:3306/gmall_report?useUnicode=true&characterEncoding=utf-8"  \
--username root \
--password 123456 \
--table ads_order_by_province \
--num-mappers 1 \
--export-dir /warehouse/gmall/ads/ads_order_by_province \
--input-fields-terminated-by "\t" \
--update-mode allowinsert \
--update-key dt,recent_days,province_id \
--input-null-string '\\N'    \
--input-null-non-string '\\N'




#todo ------------------------ 优惠券主题 ------------------------
#todo ads_coupon_stats
/opt/module/sqoop/bin/sqoop export \
--connect "jdbc:mysql://node101:3306/gmall_report?useUnicode=true&characterEncoding=utf-8"  \
--username root \
--password 123456 \
--table ads_coupon_stats \
--num-mappers 1 \
--export-dir /warehouse/gmall/ads/ads_coupon_stats \
--input-fields-terminated-by "\t" \
--update-mode allowinsert \
--update-key dt,coupon_id \
--input-null-string '\\N'    \
--input-null-non-string '\\N'




#todo ------------------------ 活动主题 ------------------------
#todo ads_activity_stats
/opt/module/sqoop/bin/sqoop export \
--connect "jdbc:mysql://node101:3306/gmall_report?useUnicode=true&characterEncoding=utf-8"  \
--username root \
--password 123456 \
--table ads_activity_stats \
--num-mappers 1 \
--export-dir /warehouse/gmall/ads/ads_activity_stats \
--input-fields-terminated-by "\t" \
--update-mode allowinsert \
--update-key dt,activity_id \
--input-null-string '\\N'    \
--input-null-non-string '\\N'